export const chartAlarmType = () => {
  const { clientWidth:w } = document.body

  return {
    title: {
      text: '告警设备',
      subtext: '处理率',
      textStyle: {
        color: '#fff',
        fontSize: w/1920 * 20,
        align: 'center',
        rich: {
          align: 'center'
        }
      },
      subtextStyle: {
        color: '#fff',
        fontSize: w/1920 * 20,
        align: 'center',
        rich: {
          align: 'center'
        }
      },
      top: '36%',
      left: '28%'
    },
    color:['#9bc8df', '#ff2f00'],
    legend: {
      icon: "circle",
  　　itemWidth: w/1920 * 10,
  　　itemHeight: w/1920 * 10,
      orient: 'vertical',
      top: '40%',
      right: 0,
      textStyle:{//图例文字的样式
        color:'#fff',
        fontSize: w/1920 * 12
      },
      data: ['已处理', '未处理']
    },
    series: [
      {
        name: '',
        type: 'pie',
        radius: ['50%', '70%'],
        center: ['40%', '50%'],
        avoidLabelOverlap: false,
        label: {
          show: false,
          position: 'center'
        },
        emphasis: {
          label: {
            show: false
          }
        },
        labelLine: {
          show: false
        },
        data: [
          {value: done, name: '已处理'},
          {value: yet, name: '未处理'},
        ]
      }
    ]
  }
}